<template>
  <view :style="themeColor">
    <view class="page">
      <fu-custom bgColor="bg-white" :isBack="true" :isBottom="true">
        <block slot="content">实名认证</block>
      </fu-custom>
      <!---flex布局flex布局开始-->
      <view class="flex flex-direction align-stretch benben-flex-layout realNameAuthentication_flex_1">
        <view class='flex flex-direction align-stretch realNameAuthentication_fd1_0'>
          <text class='realNameAuthentication_fd1_0_c0'>真实姓名：</text>
          <text class='realNameAuthentication_fd1_0_c1'>费洋洋</text>
        </view>
        <view class='flex flex-direction align-stretch realNameAuthentication_fd1_0'>
          <text class='realNameAuthentication_fd1_0_c0'>身份证号：</text>
          <text class='realNameAuthentication_fd1_0_c1'>371036379123098478</text>
        </view>
        <view class='flex flex-wrap align-center justify-between realNameAuthentication_fd1_0'>
          <text class='realNameAuthentication_fd1_2_c0'>身份证人像面</text>
          <image class='realNameAuthentication_fd1_2_c1' mode="aspectFit" :src='STATIC_URL+"443.png"'></image>
        </view>
        <view class='flex flex-wrap align-center justify-between realNameAuthentication_fd1_0'>
          <text class='realNameAuthentication_fd1_2_c0'>身份证国徽面</text>
          <image class='realNameAuthentication_fd1_2_c1' mode="aspectFit" :src='STATIC_URL+"444.png"'></image>
        </view>
      </view>

      <!---flex布局flex布局结束-->
      <!---flex布局flex布局开始-->
      <view class="flex flex-direction align-stretch benben-flex-layout realNameAuthentication_flex_2">
        <view class='flex flex-direction align-stretch realNameAuthentication_fd2_0'>
          <text class='realNameAuthentication_fd2_0_c0'>真实姓名：</text>
          <input type="text" :placeholder="`请输入您的真实姓名`" confirm-type="done" :maxlength="-1"
            placeholder-style="color:#999;font-size:28rpx" />
        </view>
        <view class='flex flex-direction align-stretch realNameAuthentication_fd2_0'>
          <text class='realNameAuthentication_fd2_0_c0'>身份证号：</text>
          <input type="idcard" :placeholder="`请输入您的身份证号码`" confirm-type="done" :maxlength="18"
            placeholder-style="color:#999;font-size:28rpx" />
        </view>
        <view class='flex flex-direction align-stretch realNameAuthentication_fd2_2'>
          <text class='realNameAuthentication_fd2_2_c0'>身份证件照-正面</text>
          <view class='flex flex-wrap align-center'>
            <view class="upload position-relative">
              <text v-if="fd2_2_c1_c0 != ''" @tap="fd2_2_c1_c0 = ''"
                class='fu-iconfont2 position-absolute realNameAuthentication_fd2_2_c1_c0_icon'>&#xE8E7;</text>
              <image class=" realNameAuthentication_fd2_2_c1_c0_image" mode="aspectFit"
                @tap="soloChooseImage('fd2_2_c1_c0id','fd2_2_c1_c0',false,false)"
                :src="fd2_2_c1_c0 ? fd2_2_c1_c0 : STATIC_URL+'445.png'"></image>
            </view>
          </view>
          <text class='realNameAuthentication_fd2_2_c2'>身份证件照-背面</text>
          <view class='flex flex-wrap align-center'>
            <view class="upload position-relative">
              <text v-if="fd2_2_c3_c0 != ''" @tap="fd2_2_c3_c0 = ''"
                class='fu-iconfont2 position-absolute realNameAuthentication_fd2_2_c1_c0_icon'>&#xE8E7;</text>
              <image class=" realNameAuthentication_fd2_2_c1_c0_image" mode="aspectFit"
                @tap="soloChooseImage('fd2_2_c3_c0id','fd2_2_c3_c0',false,false)"
                :src="fd2_2_c3_c0 ? fd2_2_c3_c0 : STATIC_URL+'445.png'"></image>
            </view>
          </view>
        </view>
        <view class='flex flex-wrap align-center justify-center realNameAuthentication_fd2_3'>
          <button class='realNameAuthentication_fd2_3_c0'>提交</button>
        </view>
      </view>

      <!---flex布局flex布局结束-->


    </view>
  </view>
</template>
<script>
  import UploadImage from '@/common/utils/upload-image.js'
  export default {
    components: {},


    data() {
      return {
        "fd2_2_c1_c0": "",
        "fd2_2_c1_c0id": "",
        "fd2_2_c3_c0": "",
        "fd2_2_c3_c0id": ""
      };
    },
    computed: {
      themeColor() {
        return this.$store.getters.themeColor
      },

    },
    watch: {},
    onLoad(options) {

    },
    onUnload() {

    },
    onReady() {

    },
    onShow() {

    },
    onHide() {

    },
    onResize() {

    },
    onPullDownRefresh() {

    },
    onReachBottom(e) {

    },
    onPageScroll(e) {

    },
    methods: {
      //上传单图、多图方法
      soloChooseImage(id, path, obj, obj1, fnName = false) {
        let self = this
        if (!obj) obj = this
        if (!obj1) obj1 = this
        if (self.uploading) {
          return
        }
        // 从相册中选择图片
        uni.chooseImage({
          count: 1, // 默认3
          sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图，默认二者都有
          success: function(res) {
            self.uploading = true
            // 开始上传
            new UploadImage(res.tempFiles, {
              complete: function(res) {
                self.uploading = false
                if (id) self.$set(obj, id, res[0].id)
                if (path) self.$set(obj1, path, res[0].path)
                if (fnName) self[fnName]()
              },
            })
          },
        })
      }
    }
  };
</script>
<style lang="scss" scoped>
  .page {
    width: 100vw;
    overflow-x: hidden;
    min-height: calc(100vh - var(--window-bottom));
    background: var(--benbenbgColor1);
    background-size: 100% auto;
  }

  .realNameAuthentication_flex_0 {
    border-bottom: 1px solid #eee;
    background: #fff;
    width: 750rpx;
    height: 88rpx;
    overflow: hidden;
    z-index: 10;
    top: 0rpx;
    background-size: 100% auto !important;
  }

  .realNameAuthentication_fd0_0_c1_c0 {
    font-size: 36rpx;
    font-weight: 700;
    color: #333;
    line-height: 88rpx;
  }

  .realNameAuthentication_fd0_0_c0_c0 {
    font-size: 36rpx;
    color: #333;
  }

  .realNameAuthentication_fd0_0_c0 {
    width: 120rpx;
  }

  .realNameAuthentication_fd0_0 {
    padding: 0rpx 32rpx 0rpx 32rpx;
  }

  .realNameAuthentication_flex_1 {
    padding: 0rpx 32rpx 0rpx 32rpx;
  }

  .realNameAuthentication_fd1_2_c1 {
    width: 315rpx;
    height: 199rpx;
    border-radius: 8rpx;
  }

  .realNameAuthentication_fd1_2_c0 {
    color: #333333;
    font-size: 32rpx;
    font-weight: 500;
    line-height: 45rpx;
  }

  .realNameAuthentication_fd1_0_c1 {
    color: #BFBFBF;
    font-size: 32rpx;
    font-weight: 500;
    line-height: 45rpx;
    margin: 20rpx 0rpx 0rpx 0rpx;
  }

  .realNameAuthentication_fd1_0_c0 {
    color: #333333;
    font-size: 28rpx;
    font-weight: 500;
    line-height: 40rpx;
  }

  .realNameAuthentication_fd1_0 {
    border-bottom: 1px solid #eee;
    padding: 32rpx 0rpx 32rpx 0rpx;
  }

  .realNameAuthentication_flex_2 {
    padding: 0rpx 32rpx 0rpx 32rpx;
  }

  .realNameAuthentication_fd2_3_c0 {
    background: var(--benbenbgColor7);
    border-radius: 44rpx 44rpx 44rpx 44rpx;
    width: 686rpx;
    line-height: 88rpx;
    font-size: 32rpx;
    color: #fff;
    height: 88rpx;
  }

  .realNameAuthentication_fd2_3 {
    position: fixed;
    left: 0rpx;
    bottom: calc(48rpx + var(--window-bottom));
    width: 750rpx;
  }

  .realNameAuthentication_fd2_2_c2 {
    color: #333333;
    font-size: 32rpx;
    font-weight: 500;
    line-height: 45rpx;
    margin: 56rpx 0rpx 32rpx 0rpx;
  }

  .realNameAuthentication_fd2_2_c1_c0_image {
    width: 200rpx;
    height: 200rpx;
  }

  .realNameAuthentication_fd2_2_c1_c0_icon {
    top: 0rpx;
    right: 0rpx;
    z-index: 10;
    color: #ff5536;
  }

  .realNameAuthentication_fd2_2_c0 {
    color: #333333;
    font-size: 32rpx;
    font-weight: 500;
    line-height: 45rpx;
    margin: 0rpx 0rpx 32rpx 0rpx;
  }

  .realNameAuthentication_fd2_2 {
    padding: 48rpx 0rpx 0rpx 0rpx;
  }

  .realNameAuthentication_fd2_0_c0 {
    color: #333333;
    font-size: 28rpx;
    font-weight: 500;
    line-height: 40rpx;
    margin: 0rpx 0rpx 20rpx 0rpx;
  }

  .realNameAuthentication_fd2_0 {
    border-bottom: 1px solid #eee;
    padding: 32rpx 0rpx 32rpx 0rpx;
  }
</style>